﻿<%@ Page Title="" Language="C#" MasterPageFile="~/DonViNganhPage/DonViNganhSt.Master" AutoEventWireup="true" CodeBehind="ThongKe.aspx.cs" Inherits="HDVN5.DonViNganhPage.RenLuyen.DangThu.ThongKe" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="FeaturedContent" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <div>
      <div id="thongke1">
                <%
                    Int32 MaDonVi = Convert.ToInt32(Session["MADONVIID"].ToString());
                    RenLuyenModule.ChuongTrinhDangThu thongKeDangThus = new RenLuyenModule.ChuongTrinhDangThu(MaDonVi);
                    RenLuyenModule.CustomModel.ThongKeSummary tongKet = thongKeDangThus.summaryReportLevelProgram();
                %>
                <div id="tongket">
                    <input type="hidden" id="madonvi" name="madonvi" value='<%=MaDonVi.ToString() %>' />
                <%
                    string[] x = { "Công Nhận", "Chưa công nhận", "Đã đăng ký", "Chưa đăng ký" };
                    int[] y = { tongKet.SoDoanSinhDaCongNhan, tongKet.SoDoanSinhChuaCongNhan, tongKet.SoDoangSinhDKyTrucTuyen + tongKet.SoDoanSinhDkyQuaTruong, tongKet.SoDoanSinhChuaDangKy };
                    chrtTongKet.Series[0].Points.DataBindXY(x, y);
                    chrtTongKet.Series[0].ChartType = SeriesChartType.Pie;
                    chrtTongKet.Legends[0].Enabled = true;
                 %>
                    <asp:Chart ID="chrtTongKet" runat="server">
                        <Series>
                            <asp:Series Name="ThongKe" >
                      
                            </asp:Series>
                        </Series>
                        <ChartAreas>
                            <asp:ChartArea Name="ChartArea1">
                       
                            </asp:ChartArea>
                        </ChartAreas>
                        <Legends>
                            <asp:Legend Alignment="Center" Docking="Bottom" IsTextAutoFit="True" Name="Default" LegendStyle="Row" />
                        </Legends>
                    </asp:Chart>
                </div>
                <div id="chitiet">
                    <%
                        List<RenLuyenModule.CustomModel.ThongKeDangThu> details = thongKeDangThus.listThongKe();
                    %>
                    <table id="thongke" class="thongke">
                          <tr>
                            <th>Tên Đẳng Thứ</th>
                            <th style="width:15%">Số DKý Trực Tuyến</th>
                            <th style="width:15%">Số DKý Offline</th>
                            <th style="width:15%">Số Chưa Đăng Ký</th>
                            <th style="width:15%">Số Công Nhận</th>
                            <th style="width:15%">Số Chưa Công Nhận</th>
                        </tr>
                        <%
                            foreach (RenLuyenModule.CustomModel.ThongKeDangThu item in details){
                        %>
                        <tr>
                             <td>
                                 <%=item.TenDangThu %>
                            </td>
                             <td>
                                <%=item.SoDoangSinhDKyTrucTuyen %> /
                                 <%=item.TyLeDangKyTrucTuyen %>%
                            </td>
                             <td>
                                <%=item.SoDoanSinhDkyQuaTruong %>/
                                   <%=item.TyLeDangKyQuaTruong %>%
                             </td>
                             <td>
                                <%=item.SoDoanSinhChuaDangKy %>
                            </td>
                             <td>
                                <%=item.SoDoanSinhDaCongNhan %>/
                                   <%=item.TyLeCongNhan %>%
                            </td>
                             <td>
                                <%=item.SoDoanSinhChuaCongNhan %> /
                                   <%=item.TyLeChuaCongNhan %>%
                            </td>
                        </tr>
                        <%
                            }
                        %>
                    </table>
                </div>

</asp:Content>
